<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<link href="./css/modern.css" rel="stylesheet"> 
<link href="./css/style-student.css" rel="stylesheet" type="text/css">
</head>
	
<body>
<%
String firstname = (String) request.getAttribute("firstname");
String lastname = (String) request.getAttribute("lastname");
String courseNumber = (String) request.getAttribute("courseNumber");
String sectionNumber = (String) request.getAttribute("sectionNumber");
String isEmpty = (String) request.getAttribute("isEmpty");
String OverallIndGrade = (String) request.getAttribute("OverallIndGrade");
String OverallGroupGrade = (String) request.getAttribute("OverallGroupGrade");
String OverallGrade = (String) request.getAttribute("OverallGrade");
String studentID = (String) request.getAttribute("studentID");
%>
<div id="container">
	<div id="header"><br>
			<h1 id="main-title">
				<b><font color="000000"> EECE Student Group Assessments</b></font>
			</h1>
			<h2>
				Welcome
				<%=firstname%>
				<%=lastname%>
				! <a href="index.html">
					<p align="right">
						<font size="5">Logout</font>
					</p>
				</a>
			</h2>
	</div>
	
    <div id="body"><br>
    		<form id=form method="post" action="StudentBackPortalServlet">
             	<a href = "javascript:;" onclick="document.getElementById('form').submit();" class="back-button big page-back">
             		<input type = "hidden" name = "firstname" value = <%=firstname%>>
					<input type = "hidden" name = "lastname" value = <%=lastname%>>	
             		<input type = "hidden" name = "studentID" value = <%=studentID%>>	
             	</a>
            </form>
    	<div id="innerBody" class="page-region-content tiles">
		<h1>Grades for <%=courseNumber%> Section <%=sectionNumber%></h1><br>
		    <div class="tile-group" align="center">
				<table cellspacing="0" cellpadding="0" border="0" width="325"
					class="striped" border=1>
					<tr>
						<td>
							<table cellspacing="0" cellpadding="1" border="0" width="300"
								class="striped" border=1>
								<tr>
									<th></th>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<div style="height: 400px; width: 1000px; overflow: auto;">
								<table class="fixed" cellspacing="0" cellpadding="1" border="0"
									width="300" class="striped" border=1>
									<tr>
										<td><b>Assessments</b></td>
										<td><b>Grade</b></td>
									</tr>
									<c:forEach items="${GradeInfo}" var="Info">
									<tr>
										<td><c:out value="${Info.name}"/></td>
										<td><c:out value="${Info.grade}"/> out of <c:out value="${Info.weight}"/></td>
									</tr>
									</c:forEach>
								</table>
							</div>
						</td>
					</tr>
				</table>
				<%
					if(isEmpty.equals("true")){
				%>
				<p>There are no courses added to the System.</p>
				<%
					}
				%>
				<br>
				<!-- 
				<table class="striped">
					<tr>
						<td><b>Overall Individual Grade</b></td>
						<td><b>Overall Group Grade</b></td>
						<td><b>Overall Assessment Grade</b></td>
					</tr>
					<tr>
						<td><%=OverallIndGrade%></td>
						<td><%=OverallGroupGrade%></td>
						<td><%=OverallGrade%></td>
					</tr>
				</table>
				 -->
            </div>
            </div>
	</div>
		<div id="footer">
			&copy;UBC Electrical and Computer Engineering. Styled with <a
				href="http://metroui.org.ua">Metro UI CSS</a>
		</div>
		
</div>
</body>
</html>